package com.edgar.download;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.net.ConnectivityManager;

import com.edgar.baselibrary.utils.NetworkUtils;

/**
 * Created by dell on 2015/9/25.
 */
public class DownloadReceive extends BroadcastReceiver{
    @Override
    public void onReceive(Context context, Intent intent) {
        if(intent != null){
            String action = intent.getAction();
            if(ConnectivityManager.CONNECTIVITY_ACTION.equals(action)){
                if(NetworkUtils.isConnected(context)){
                    //
                } else {
                    //
                }
            }
        }
    }
}